<?php

namespace common\models\db;

use Yii;

/**
 * This is the model class for table "meta_item".
 *
 * @property integer $id
 * @property string $title
 * @property string $description
 * @property integer $keywrod
 * @property integer $createTime
 * @property integer $updateTime
 * @property string $createEmail
 * @property string $updateEmail
 */
class MetaNews extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'meta_news';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'title', 'keyword', 'createEmail', 'updateEmail'], 'required'],
            [['id', 'createTime', 'updateTime'], 'integer'],
            [['description'], 'string'],
            [['title','keyword'], 'string', 'max' => 220],
            [['createEmail', 'updateEmail'], 'string', 'max' => 50]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'title' => Yii::t('app', 'Title'),
            'description' => Yii::t('app', 'Description'),
            'keyword' => Yii::t('app', 'Keywrod'),
            'createTime' => Yii::t('app', 'Create Time'),
            'updateTime' => Yii::t('app', 'Update Time'),
            'createEmail' => Yii::t('app', 'Create Email'),
            'updateEmail' => Yii::t('app', 'Update Email'),
        ];
    }
}
